package com.designpatterns.facade;

import com.designpatterns.subsystemclasses.ServiceA;
import com.designpatterns.subsystemclasses.ServiceB;
import com.designpatterns.subsystemclasses.ServiceC;
import com.designpatterns.subsystemclasses.impl.ServiceAImpl;
import com.designpatterns.subsystemclasses.impl.ServiceBImpl;
import com.designpatterns.subsystemclasses.impl.ServiceCImpl;

/**
 * Facade Class
 * 
 * @author Haiqi.Wang
 * @since 2013-6-5上午10:39:00
 */
public class Facade {

	ServiceA sa;
	ServiceB sb;
	ServiceC sc;
	
	/** default constructor **/
	public Facade() {
		this.sa = new ServiceAImpl();
		this.sb = new ServiceBImpl();
		this.sc = new ServiceCImpl();
	}

	public void methodA(){
		sa.methodA();
		sb.methodB();
	}
	
	public void methodB(){
		sb.methodB();
		sc.methodC();
	}
	
	public void methodC(){
		sc.methodC();
		sa.methodA();
	}
	
}
